package com.axjy.his.controller;

import com.axjy.his.pojo.Role;
import com.axjy.his.pojo.User;
import com.axjy.his.service.RoleService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by lenovo on 2017/11/6.
 */
@RestController
@RequestMapping("/sys/role")
public class RoleController {

    @Resource
    private RoleService role;

    @RequestMapping("/se")
    public List<Role> list(){
        return role.selectAllRole();
    }
    @RequestMapping("/searchByRole")
    public List<User> selectById(Integer id){
        return role.searchUserByRole(id);
    }


}

